package de.stefanocke.roo.wicket.details;

import java.util.List;

import org.springframework.roo.classpath.details.ConstructorMetadata;
import org.springframework.roo.model.JavaType;

import de.stefanocke.roo.wicket.MidUtils;
import de.stefanocke.roo.wicket.base.BeanPropertiesAwareItdMetadataBase;
import de.stefanocke.roo.wicket.base.ModelClassAwareMetadataCreationParams;
import de.stefanocke.roo.wicket.model.BeanPropertyMetadataWithDetails;

/**

 */
public class DetailsMetadata extends BeanPropertiesAwareItdMetadataBase<DetailsAnnotationValues, DetailsComponentMetadata> implements DetailsComponentMetadata{
	public static final MidUtils midUtils = MidUtils.get(DetailsMetadata.class);



	public DetailsMetadata(ModelClassAwareMetadataCreationParams<DetailsAnnotationValues> cmcp,
			List<BeanPropertyMetadataWithDetails<DetailsComponentMetadata>> propertiesForScaffolding) {
		super(cmcp, new DetailsItdBuilder(), propertiesForScaffolding);

		buildItdTypeDetails();

	}

	@Override
	public List<? extends ConstructorMetadata> getConstructors() {
		return getMemberHoldingTypeDetails().getDeclaredConstructors();
	}

	@Override
	public JavaType[] getRequiredAnnotations() {
		return this.getAnnotationValues().getRequiredAnnotations();
	}
	
	@Override
	public boolean needsDecoration() {
		return true;
	}

}
